//
//  Mediator+BKGD.m
//  bestkeep
//
//  Created by 武探 on 2016/11/10.
//  Copyright © 2016年 utouu. All rights reserved.
//

#import "Mediator+BKGD.h"
#import "BKGDAction.h"

NSString *const BKGDTarget = @"BKGDAction";

NSString *const BKGDActionGoodsDetailViewController = @"goodsDetailViewController:";

@implementation Mediator (BKGD)

-(UIViewController *)BKGD_goodsDetailViewController:(NSString *)goodsId {
    
    MediatorOptions *options = [MediatorOptions optionsWithTargetName:BKGDTarget actionName:BKGDActionGoodsDetailViewController];
    options.parameters = @{@"goodsId": goodsId};
    return [[Mediator sharedInstance] performWithOptions:options];
}

-(UIViewController *)BKGD_goodsDetailViewController:(NSString *)goodsId saleTypes:(id)saleTypes {
    
    MediatorOptions *options = [MediatorOptions optionsWithTargetName:BKGDTarget actionName:BKGDActionGoodsDetailViewController];
    saleTypes = saleTypes && ![saleTypes isEqual:[NSNull null]] ? saleTypes : @"";
    options.parameters = @{@"goodsId": goodsId, @"saleTypes": saleTypes};
    return [[Mediator sharedInstance] performWithOptions:options];
}

-(nonnull UIViewController*)BKGD_goodsDetailViewController:(nonnull NSString *)goodsId saleTypes:(nullable id)saleTypes storeId:(nonnull NSString *)storeId shopKeeper:(nonnull NSString *)shopKeeper{
    
    MediatorOptions *options = [MediatorOptions optionsWithTargetName:BKGDTarget actionName:BKGDActionGoodsDetailViewController];
    saleTypes = saleTypes && ![saleTypes isEqual:[NSNull null]] ? saleTypes : @"";
    options.parameters = @{@"goodsId": goodsId, @"saleTypes": saleTypes, @"storeId": storeId, @"shopKeeper": shopKeeper};
    return [[Mediator sharedInstance] performWithOptions:options];
}

-(UIViewController *)BKGD_goodsDetailViewController:(NSString *)goodsId saleTypes:(id)saleTypes goodsCoverImg:(NSString*)goodsCoverImg{
    
    MediatorOptions *options = [MediatorOptions optionsWithTargetName:BKGDTarget actionName:BKGDActionGoodsDetailViewController];
    saleTypes = saleTypes && ![saleTypes isEqual:[NSNull null]] ? saleTypes : @"";
    options.parameters = @{@"goodsId": goodsId, @"saleTypes": saleTypes, @"goodsCoverImg": goodsCoverImg};
    return [[Mediator sharedInstance] performWithOptions:options];
}

@end
